#ifndef INCLUDE_fonction
#define INCLUDE_fonction


#define ECRAN_X	800
#define ECRAN_Y	600
#define AGG_ZONE 100
#define HIGHT 130
#define WIDTH 100
#define LEVEL_MAX 5
#define SEQUENCE_MAX 5
	
	typedef struct 
	{
	int HP; //Health point
	int HP_MAX; //HP max
	int DPS_MAX; //Max Damage dealt
	int DPS_MIN; //Min damage dealt
	int HC; //Hit chance
	int SCORE; //SCORE
	}stats; //Etats
	typedef struct 
	{
	int X; //abscisse x
	int Y;
	int W; //width
	int H; //height
	int coll; //collision
	int agg; //aggro (espacement)
	int px; //pas de deplacement
	int type; //type de personnage
	char direction; //
	int is_fighting; //etat de fight
	int is_alive; //vie
	stats stat; //struct stats
	}personage;


int ini_alleg(); //init allegro
int main_move(int *x , char *d , int w); //x: abscisse rich d: direction rich w: width rich
int Collision(personage p1,personage p2);
int aggro(personage p1, personage p2);
void ini_pirate(personage *p, int str, int typ); //str: strength typ = type p:pirate
void ini_main(personage *m , int h ,int w); //m: main character h:height w:width
void fight(personage *agg, personage *vic); //agg: agressor vic:victim
void main_fight(personage *p,personage pirate[],int nbre); //pirate: tableau de pirates nbre:taille de pirate
void reset_main(personage *p,int test); //test: test sur health (reinitialisation selon stage)
void get_path(personage p,char str[]); // str:taswira *pirate*
void get_main_path(personage p,char str[]);// *richard*
void increment(int *lvl,int *seq); //changement de level & seq
void random_move(personage *p, int xmin, int xmax); //xmin ---> xmax = champ
void move_to_main(personage *p, personage m); //deplacement pirates vers richard
int get_colorHP(int perc); //barre de vie selon HP perc:% health
void set_score(personage *p); //score
int menu (BITMAP *Buffer,BITMAP *image); //menu


#endif
